|
|
Duh! That would be the all-encompassing answer, wouldn't it!
My bad! Thanks!
RageInTheMachine9532
|
|
|
|
|
you could use session variables
application 1
save your value
session["id"] = txtbox1.text
application 2
read your value
dim strtest as string = session["id"]
there is another other option you could pass the value as parameter, it depends on your flow.
|
|
|
|
|
hi programmers,
i got something new in my mind... i want to hide some files or folder that are download from the internet such that they are not viewed by one, except some key combination or if he is under the admin rights for win2000/xp/NT etc.
|
|
|
|
|
How do you want to hide these files? Do you want to want to encrypt them so noone can see the contents? Do you want the files hidden in the directory, which is pretty weak security by the way...)? Need a bit more detail about what you want...
RageInTheMachine9532
|
|
|
|
|
Hello!
I have a little problem:
Example:
if I have 01/06/2003 and I want to add x months (example 3 months) and I want to obtain 01/09/2003 or to add days or years.
How I do this thing in Visual Basic .NET 2003?
Or how to convert the date to days and then to reconvert to date.
Please help me!
Sorry for my english!
Thank you!
|
|
|
|
|
Try this:
DateTime dt = DateTime.Parse("11/06/2003");
string dts = dt.AddYears(3).ToString();
|
|
|
|
|
I have a file which is seperated into fields by a comma
for each field. I am trying to read the file into some type of structure but am unable to get past the point of reading upto the comma and then
storing that away and then going back and reading the next field.
Any help would be appreciated.
|
|
|
|
|
For each line that you read in use split(',') on the string. The returned value will be an array of strings, each representing one field.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
|
I have broken appart the file by using the split function but now have an issue with the carriage returns. The values from the last field of the line is put with the first field of the next line?
|
|
|
|
|
ccandler wrote:
I have broken appart the file by using the split function but now have an issue with the carriage returns. The values from the last field of the line is put with the first field of the next line?
Now I'm confused.
You mean that each line of the file doesn't represent a full record, and that a record can overlap lines of the file?
Maybe you could provide some sample data and information about the file format? A straight CSV would be readable the way suggested.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
I use IcmpSendEcho func (from Lib "icmp.dll") to check 2^16 IP addresses for pinging, it takes too much time. Has anybody other decision? The program has to be written in VB. I tried to decrease PING_TIMEOUT parameter of this function(from 500 ms to 100 ms), but it doesn't decrease the programm runtime.
Thanks in advance
|
|
|
|
|
If your pinging all 65K address one at a time on a single thread, then yes, it'll take a long time to get through them. A faster method would be to write a multithreaded solution and launch, say, 100 pingers at a time.
If your using VB6, free threading is NOT a trivial task.
If your using VB.NET, free threading is MUCH MUCH (Hint! ) easier!
RageInTheMachine9532
|
|
|
|
|
can u send me the code
Thanks
|
|
|
|
|
Hello and hi
i want that on clicking a browse button
on a certain form , a word file is selected (usiing common dialog box)and then contents of word file will be displaced on
any of the object like (ole db etc.)
and using a save button i can store contents of that word file in to another file anywhere on the disk
tell me which object is more comfortable to use to show the contents of a Word Document and how ?
example required
ali baba
|
|
|
|
|
I declare a brush... Dim lBrush as SolidBrush
Then I use it lots of times in a function for different things like gradient fills. So I might do...
lBrush = new GradientBrush...
Then again...
lBrush = new GradientBrush...
You get the idea. Should I call lBrush.Dispose before I say lBrush=New brush....
If I don't, do I get a memory leak?
Sounds like a waste of time, unless you have an object that is going to be in scope for a long time using transient resources that should be released quickly.
Thanks 4 ur help guys.
Nursey
|
|
|
|
|
The general rule is yes, of course.
Objects that expose the IDisposable interface do so because they contain resources that a limited in some way. The destructor/finaliser of these objects will call Dispose anyway, but is it better to call Dispose when you know you don't need the object any more. Why? Because you don't know when the garbage collector will clean up after you, which could mean that you run out of the resource and are then left wondering why your program failed.
So... If its got an IDisposable interface then use it.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
I was pretty disappointed when I first looked over the RichTextbox component and seen that they didn't include UTF-8 as one of the Format Options (since it is available in V 3 of the control). What I'd like to do is extend the loadfile/save file function by creating a class or module that contructs the RichEdit's EditCallback function so that I can then use SendMessage to Streamin and Streamout the data. I've done this before in VB6 -- but I can't seem to get the code to work in vb.net because I don't understand how to generate the EDITSTREAM structure. I'd like to pass a filestream handle into the Callback, but I can't figure out how to create the EDITSTREAM structure so that dwCookie will allow the handler and then how to use that handler in the Callback. I'm wonder if anyone here has done something like this (or maybe has C# or C++ code that they wouldn't mind sharing -- or better yet, coverting) or maybe knows of another way that I could load UTF8 data into a RichTextbox.
Thanks
|
|
|
|
|
Does anyone have an example of how they implemented the singleton design pattern in Visual Basic 6.0.
|
|
|
|
|
For anyone who cares...I found an old article from Visual Basic Programmers Journal that will help with the Singleton issue.
VBPJ article[^]
Good luck.
|
|
|
|
|
Does VB 6.0 static the same as C++ static?
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I need to find out the printable area on a page, vb.net either give me the paper size or the size after margin, which is set by the user.
I used the API to find that in VB6, does vb.net expose that property or do we have to go back to API?
Thanks,
Tao
|
|
|
|
|
If it does, it's very well hidden! Best bet looks like API again.
RageInTheMachine9532
|
|
|
|
|
I'm trying to set a property in the following class:
<system.runtime.interopservices.guidattribute("3050f558-98b5-11cf-bb82-00aa00bdce0b"), system.runtime.interopservices.coclassattribute(mshtml.ceventobjclass)="">
Public Class CEventObj
Member of mshtml
The property is:
<system.runtime.interopservices.dispidattribute(1007)>
Public Property returnValue As Object
Member of mshtml.CEventObj
When I try:
Dim objevent As New mshtml.CEventObjClass() OR
Dim objevent As New mshtml.CEventObj() OR
Dim objevent As New CEventObjClass() OR
Dim objevent As New CEventObj()
I get the following error, also the CSLID from the Object Browser of 3050F558-98B5-11CF-BB82-00AA00BDCE0B is different from the COMException error message
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Test Form .exe Additional information: COM object with CLSID {3050F48A-98B5-11CF-BB82-00AA00BDCE0B} is either not valid or not registered.
The Registry states the CSLID 3050F48A-98B5-11CF-BB82-00AA00BDCE0B from COMError message is the following:
HKEY_CLASSES_ROOT\CLSID\{3050F48A-98B5-11CF-BB82-00AA00BDCE0B}...
default(not set)
HKEY_CLASSES_ROOT\CLSID\{3050F48A-98B5-11CF-BB82-00AA00BDCE0B}\InprocServer32...
Assembly(Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
Class(mshtml.CEventObjClass)
Runtime version(v1.0.3705)
The Registry states the CSLID 3050F558-98B5-11CF-BB82-00AA00BDCE0B from the Object Browser view is the following:
HKEY_CLASSES_ROOT\Interface\{3050F558-98B5-11CF-BB82-00AA00BDCE0B}
default(DispCEventObj)
HKEY_CLASSES_ROOT\Interface\{3050F558-98B5-11CF-BB82-00AA00BDCE0B}\ProxyStubClsid...
default(00020420-0000-0000-C000-000000000046)
HKEY_CLASSES_ROOT\Interface\{3050F558-98B5-11CF-BB82-00AA00BDCE0B}\ProxyStubClsid32...
default(00020420-0000-0000-C000-000000000046)
HKEY_CLASSES_ROOT\Interface\{3050F558-98B5-11CF-BB82-00AA00BDCE0B}
TypeLib(3050F1C5-98B5-11CF-BB82-00AA00BDCE0B)
Just to be sure I ran regsvr32 mshtml.dll sucessfully
What is going on? the CSLId from the COMException InprocServer32 points to Class(mshtml.CEventObjClass). H E L P!
Thanks, GregC
|
|
|
|