|
FileName = App.path & "\TextFile.txt"
Open FileName For Input As 1
whole_file = Input$(LOF(1), #1)
Close 1
Text1.Text = whole_file
Note : if the file contains more than one line you have to set the textbox control to multiline is true and their scrolls.
Thanks & Regards
Kumaran
|
|
|
|
|
Thanks, I will check this out
|
|
|
|
|
What's the process to submit an article of vb.net in this site?
|
|
|
|
|
|
Nilish wrote: What's the process to submit an article of vb.net in this site?
Just like how any other article on this site. Go to the Submission Wizard link that Dave provided...
|
|
|
|
|
Hi Every one,
I am trying to create a crystal report with custome paper size, but i won't be to do so.
Please help me to solve this issue.
|
|
|
|
|
|
|
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
Dim strComputer As String = "."
Dim objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Dim objNewShare = objWMIService.Get("Win32_Share")
Dim errReturn = objNewShare.Create _
("C:\Temp", "Temp", FILE_SHARE, _
MAXIMUM_CONNECTIONS, "MyFolder")
i doubleClick temp folder Remote Computer
return error access denied on file
help me
|
|
|
|
|
You might want to see if that folder actually got shared on the remote machine. Your code does get a return value from the objNewShare.Create method, but it ignores the result. So, you have no way of knowing if the sahre was actually created or not, or why it failed.
Also, your code creates the share, but it never sets up any permissions for any groups or users on that share.
|
|
|
|
|
Hi All,
any one please tell me how to make a VB script as a windows service......urgent....
Thanks,
Vimal
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
I don't see how that's possible. Why would you want to do that ? Why not write a service in VB.NET instead ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for ur information... i dont know VB.net
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
If you have SQL-Server then you could schedule a regular job - which may allow you to achieve a similar effect. This can either run a stored procedure or a WScript VBS script.
|
|
|
|
|
What about VB6 then ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
any one please tell me how to make a VB script as a windows service......urgent....
Thanks,
Vimal
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
VBScript doesn't have this capability.
|
|
|
|
|
hi
i am having a .resx file with the required string and images for my project
i want to retrive values of strings using stringnames and images from the images name from that resx file .can any one give me a example .
with regards
Balagurunathan.B
|
|
|
|
|
|
hi i tried to go through that link but it wont help in my case
i want to read the string and image contents already stored in the reource file
eg if i am having name value
keyword case,if,else
then i want to read strvariable= resource1.keyword
its possible in c# i want to do it in vb.net pls help
with regards
Balagurunathan.B
|
|
|
|
|
will u send tyhe code C# code
or at
nilishgarg@yahoo.co.in
|
|
|
|
|
i saw that command in this article
http://www.codeproject.com/csharp/shadyrichtext.asp
using System;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Media;
using System.Drawing;
using System.Text;
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using System.Resources;
using System.Reflection;
using Microsoft.Win32;
using System.IO;
using System.IO.IsolatedStorage;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
namespace RTF_Parsing
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region Tables, Lists and Constants
#region Fonts
const string proportionalFontName = "Verdana";
const string monoFontName = "Courier New";
const string proportionalFontDefinition = @"{\f0\fnil\fcharset0 " + proportionalFontName + @";}";
const string monoFontDefinition = @"{\f1\fnil\fcharset0 " + monoFontName + @";}";
const int proportionalFontSize = 8;
const int monoFontSize = 9;
#endregion
#region Color Table
int[] rgbText = { 0, 0, 0 };
int[] rgbCharacter = { 128, 128, 128 };
int[] rgbShade = { 238, 238, 238 };
int[] rgbLiteral = { 144, 0, 16 };
int[] rgbComment = { 32, 128, 0 };
int[] rgbKeyword = { 13, 0, 255 };
int[] rgbClass = { 43, 145, 175 };
// It is useful to set up some aliases ...
public const string TX = @"\cf1 ";
public const string CH = @"\cf2 ";
public const string SH = @"\cf3 ";
public const string LI = @"\cf4 ";
public const string CO = @"\cf5 ";
public const string KY = @"\cf6 ";
public const string CL = @"\cf7 ";
// ... and their escaped versions
public const string escTX = @"\\cf1 ";
public const string escCH = @"\\cf2 ";
public const string escSH = @"\\cf3 ";
public const string escLI = @"\\cf4 ";
public const string escCO = @"\\cf5 ";
public const string escKY = @"\\cf6 ";
public const string escCL = @"\\cf7 ";
string colorDefinitions = "";
#endregion
#region ASCII Values
// Some ASCII constants
const char LF = (char)0x0A; // Line Feed
const char CR = (char)0x0D; // Carriage Return
const char Space = (char)0x20; // Space char
#endregion
#region Main Form Parameters
bool rtfvisible = false;
bool isFirstRun = true;
int maxFormHeight = 712; // Expanded
int minFormHeight = 568; // Not expanded
const int columns = 94; // Shading width
const string upArrow = "r";
const string downArrow = "s";
bool expanded = false;
#endregion
#region isoFiles
IsolatedStorageFile isoStore =
IsolatedStorageFile.GetStore(IsolatedStorageScope.User
| IsolatedStorageScope.Assembly, null, null);
const string isoF = "isolatedFirst.iso";
const string isoS = "isolatedSource.iso"; // Source
const string isoC = "isolatedClassList.iso"; // Class names
#endregion
#region Initialized Lists
string keywordList = "";
string unformattedClassList = "";
string formattedClassList = "";
#endregion
#endregion
// ----------------------------------------------------------------------------------------
// ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD
// ----------------------------------------------------------------------------------------
private void Form1_Load(object sender, EventArgs e)
{
// Startup screen
this.Height = minFormHeight;
btnArrow.Text = downArrow;
// Set Font properties for both Rich Text Boxes
rt1.Font = new Font(proportionalFontName, proportionalFontSize, FontStyle.Regular);
rt2.Font = new Font(monoFontName, monoFontSize, FontStyle.Regular);
rt1.Text = "";
t1.Visible = false; // t1 shows the background RTF encoding
string r = @"\red";
string g = @"\green";
string b = @"\blue";
string tx = r + rgbText[0].ToString() + g + rgbText[1].ToString() + b + rgbText[2].ToString() + ";";
string ch = r + rgbCharacter[0].ToString() + g + rgbCharacter[1].ToString() + b + rgbCharacter[2].ToString() + ";";
string sh = r + rgbShade[0].ToString() + g + rgbShade[1].ToString() + b + rgbShade[2].ToString() + ";";
string li = r + rgbLiteral[0].ToString() + g + rgbLiteral[1].ToString() + b + rgbLiteral[2].ToString() + ";";
string co = r + rgbComment[0].ToString() + g + rgbComment[1].ToString() + b + rgbComment[2].ToString() + ";";
string ky = r + rgbKeyword[0].ToString() + g + rgbKeyword[1].ToString() + b + rgbKeyword[2].ToString() + ";";
string cl = r + rgbClass[0].ToString() + g + rgbClass[1].ToString() + b + rgbClass[2].ToString() + ";";
// These colors will make up a new color table
colorDefinitions = tx + ch + sh + li + co + ky + cl;
// On first run, we will create in isolated storage
// a Class List (isoC) and a source file (isoS). The
// default, first run, source file content is a resource.
keywordList = Resources1.Keywords;
InitializeDataFiles();
}
resources one is resx file
with regards
Balagurunathan.B
|
|
|
|
|
Ex : in your MyForm application, you have a resources file which has values :
+ A string : MyID = "......."
+ An image : MyImage = "......."
you can try this :
'Declare an instance of resources
Dim MyResource As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MyForm))
'Get string's value
Dim StrMyID as string = MyResource.GetString("MyID")
'Get image
Dim ImgMyImage as System.Drawing.Image = CType(MyResource.GetObject("MyImage"), System.Drawing.Image)
|
|
|
|
|
hi
thakns a lot for you . i have overcome my problem using your example but wat actually i tried was i added a resx file and tried to acces the resource from that file but failure only. while using form1.resx file i am able to do that.
normally if we add a item like 'form', 'class' etc we can acces like form1.show ,dim a as new class1 but resource1 (my resx file name) is not available in the list why?. do you have any idea .
with regards
Balagurunathan.B
|
|
|
|
|
hi
i stored the required string and its value in my main form form1.resx but it gets deleted whenever i close the dot net editor and reload the project . how i can resolve this
with regards
Balagurunathan.B
|
|
|
|