|
Hi ... i need a little help, please. This code works fine, but i'd like to convert it to use FilePutObject.
Private Structure myFriend
Public name As String
Public age As Integer
End Structure
…
Dim friendFileName As String = "R:\MyFriends.txt"
FileOpen(1, friendFileName, OpenMode.Binary)
Dim aFriend As myFriend ' Create a friend object
aFriend.name = "Laura"
aFriend.age = 29
FilePut(1, aFriend) ' Write entire structure to the hard drive
What would be the FilePutObject equivalent of the last statement (above)?
FilePutObject(1, aFriend) … does not do it
Thanks.
|
|
|
|
|
Use Print() function instead you can accomplish it by using the following code:
FileOpen(1, "File Name", OpenMode.Output)
Print(1, "Data to save")
FileClose(1)
Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
How do we initialize a date picker
HI i am using a date picker as date of birth input...
It will be really problem for the user to scroll for long time in the date picker to traverse between years, so i had added a drop-down for years....
Now my issue is that i am not able to initialize the date picker more then once depending on the changes done in the year drop down... can any one plz help me..
Regards
Nishkarsh
|
|
|
|
|
nishkarsh_k wrote: so i had added a drop-down for years....
You don't have to do this because DateTimePicker has this functionality built in. You just have to click on 'Month' for example 'November' to select month from the Menu appeared and when you click on the Year a numeric up down will appear to select a year either by clicking the up down arrow buttons or by typing.
Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
Go to properties and set the "Value" property to specific date
OR write the following code
dateTimePicker1.Value = Convert.ToDateTime("1/1/2007");
|
|
|
|
|
HI everybody,
I need to make my program connected to SPSS or excel(inputs for SPSS or excel are taken from my program) in order to calculate some results and then draw graphs (excel) and have as an output of my program or my program send it as an email??????
if what I wrote is understood and is applicable, please let me now how;)
Thanks
There is always something to learn
|
|
|
|
|
Hi, I am swtiched from VB6 to .NET 2005. I am using Data Grid Veiw on form.
but its strange for me, on 'Enter' key, it didnt jump to next column of row, rather it creates new row & jump to that row.
I am unable to find any property, which may convert its behaviour from row to next column.
Please Guide abt it.
NASIR MAHMOOD
|
|
|
|
|
Hi Friends,
I have a .net windows application using MS Access 2003 database. I have added a new setup & deployment project wizard. First Build my project then build setup project.
My question is, I did build my setup project. It did not take MS Access 2003 database when installing setup .msi file. Please advice me.
Thanks in advance
|
|
|
|
|
Use Custom Action Editor and provide a Batch file under Install node which will install/Copy your database on client's machine.
Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
Thanks your suggestion.
I am confused regarding this. please explain detail.
Thanks in advance
Regards,
Rameshkumar Thirumalaisamy
|
|
|
|
|
You can read about it here[^] to get an idea of how to use it.
AliAmjad(MCP)
|
|
|
|
|
Hi, I am facing problem with placing the controls dynamically with Autoscroll position. I am getting empty space in the form when I tried to place the controls runtime.
|
|
|
|
|
Can you display the code you are using to display the controls at runtime.
AliAmjad(MCP)
|
|
|
|
|
I had a requirement to dynamically place a number of controls on a win form. I created a custom control combining the 4 conrols I wanted and then added them to a FlowControl - this handled all the scroll issues
For Each oRow In oTable.Rows<br />
If oRow("Filename") <> sApp Then<br />
'Declare a new instance of the control<br />
Dim oApp As New ucApp(strApp)<br />
<br />
'Set some properties<br />
oApp.Left = 10<br />
oApp.Top = 100 + (20 * X) + (oApp.Height * (X - 1))<br />
'add the controll the the flowcontrol panel<br />
Me.pnlCenter.Controls.Add(oApp)<br />
X += 1<br />
End If<br />
Next
|
|
|
|
|
hello frnds,
I want to open my word file by using process not by using word.application
but i can't get the process id which opens the word file
here is my code
<br />
dim objProc as new process<br />
dim iProc as integer<br />
objproc = process.open("//word file path")<br />
iProc = objproc.id<br />
when go to see the iProc then it throws an exception as "No process is associated with it"
why????
where i am wrong ????
please help..
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Use this code instead:
Dim proc As New Process()
proc = proc.Start("file name")
MsgBox(proc.Id.ToString())
Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
Hi, AFAIK you should wait for the process to start before fetching its ID, so have
a look at Process.WaitForInputIdle().
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hello friends
I am freshers for .net, i am developing asp.net(with vb.net)project,I want detail about how to create "MENU".
srinivasan.s
|
|
|
|
|
Have you tried google ? There's tons of articles that will give you what you need. I doubt you would benefit as much from a forum reply.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i want to execute a batch file from vb.net by passing user input as arguments to the batch file.
by
siva
|
|
|
|
|
Process.Start will run a batch file. The user input to your program is available to you from the Application object, I believe.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
you can use "shell" command to do the same if you are not expecting any return value from the batch file..
Also you can redirect the output to a file and read that file in case you want the return value from the batch file...
In case you want to have the return value then using process related classes is a better method
|
|
|
|
|
hi,
i have developed one web application,in dis application i have generated
reports using excel,in my system it is working every thing fine
bt whn i open dis application from another system,there also works fine
bt excel sheet doesnt open,
i mean in another system excel sheet is not opening
can i one know's how can i do dis,
plz reply if u know
thnks in advence
afreen
|
|
|
|
|
Dude don't post same thing two times.
Regarding your problem, be specific about your description - like - error messages, error codes, may be screenshots you should provide.
"hi, I am explorer.exe. sometimes when you are doing anything at all, I will just freeze for ten minutes. All of my brother and sister windows will also freeze, because they are sad for me. Maybe we will come back, maybe not, it will be a surprise!"
|
|
|
|
|
hi,
i have developed one web application,in dis application i have generated
reports using excel,in my system it is working every thing fine
bt whn i open dis application from another system,there also works fine
bt excel sheet doesnt open,
i mean in another system excel sheet is not opening
can i one know's how can i do dis,
plz reply if u know
thnks in advence
afreen
|
|
|
|