|
i'm sorry for my kiddish attitude Rhys.
actually i was a bit upset and in damn bad state of mind.
so i could'nt control my attitude.
i'm actually sorry for the reply.
hoping for forgiveness!!!!!!!!!!!!!!!!!
rishabhs
|
|
|
|
|
Hello,
Is it possible to programatically change a folders properties? For example, I have a DFS folder which is currently active on a particular server, I want to be able to change the active server to another without opening up the Properties dialog box. Can this be done in VB6?
Or as another example,
I have a folder "C:\Test" which is not currently shared. Can I programatically change the folders properties so that it is now shared(providing I pass all the correct info) without using the Properties dialog?
My reason is we run on Win2K machines with some 'lockeddown' machines. Certain tabs in the Properties are not viewable to the 'lockeddown' user but I would like to change some settings every now... any ideas or help is appreciated.
Rhys Kirk
|
|
|
|
|
Hi !!!
My app, in VB6, is creating a thread to launch a batch file and waiting on this thread to be finished.
Here is the code :
Dim l_lRet As Long
Dim l_lCreationFlags As Long
Dim l_recStartupInfo As STARTUPINFO
Dim l_recProcInfo As PROCESS_INFORMATION
Dim l_recProcAttr As SECURITY_ATTRIBUTES
Dim l_recThreadAttr As SECURITY_ATTRIBUTES
l_recProcAttr.nLength = Len(l_recProcAttr)
l_recThreadAttr.nLength = Len(l_recThreadAttr)
l_recStartupInfo.cb = Len(l_recStartupInfo)
l_recStartupInfo.dwFlags = STARTF_USESHOWWINDOW
l_recStartupInfo.wShowWindow = SW_NORMAL
l_lCreationFlags = HIGH_PRIORITY_CLASS
If CreateProcess(vbNullString, "C:\MyBatch.bat", l_recProcAttr, l_recThreadAttr, False, l_lCreationFlags, 0&, "C:\", l_recStartupInfo, l_recProcInfo) Then
'Wait
WaitForSingleObject l_recProcInfo.hProcess, INFINITE
l_lRet = CloseHandle(l_recProcInfo.hProcess)
End If
My problem is that in the batch file, I lose all environnement variables (Path, SystemRoot), and I have no idea why, because in MSDN, it says that the new process should use the environnement variables from the creator of the process.
Anyone could help me on this point ?
Thank you !
Jerome
|
|
|
|
|
HI,
I have a problem of trying to store URL and retrieving it. I am currently working on a web browser. However I want to be able to control what URL is to be stored using the web browser so as to facilitate offline browsing and faster loading time if I visit the URL again.
Another problem is how am I able to retrieve the stored URL? Does anyone know how to do in visual basic or there is a close reference to it. Thank you.
=) hibiki
|
|
|
|
|
hibiki1979 wrote:
there is a close reference to it
Sure. It's called Internet Explorer.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Thank you for your answer.
However, what i mean by close reference to it is something that I could see the code and is written in visual basic.
=) hibiki
|
|
|
|
|
I'm not sure if it's what you want, but maybe the GetSetting and SaveSetting functions are useful? they save info in the registry - very useful for options dialogs etc.
Hope it helps
Paul W
-- A wise fox has many exits from its burrow.
modified 18-Jul-18 11:59am.
|
|
|
|
|
I am trying to write a windows application in vb.NET that behaves in a similar way to the email selection in Outlook. I am currently doing this by displaying my data read-only in a data grid, but have run into problems with the double-click event not being recognised by the grid apart from on the row header (which I don't want to display). Is there any way that the double-click event can be picked up on the data grid? Any suggestions would be gratefully received.
|
|
|
|
|
Does anyone know how I can override the Background Painting of a Textbox in VB.NET? I am currently hooking into the OnPaint / OnPaintBackground but it doesn't have any effect. Basically, I want a Gradient background instead of a Solid Color.
|
|
|
|
|
Hello All,
I wrote a com object to suck all the information and process in the dll including submission into database.
My code is:
Dim myobj As New clsMyObj
with myobj
.name = CStr(FirstName) and so on
.ConnectionString = strConnection
.mySubmission
end with
mySubmission calls the function and submit to the database.
What I gathered is that my dll is breaking because of the difference of the datatype.
My question is any way I can check the status of the myobj if the data process is not been submit? If yes How?
I can check the database state by :
Dim myconnection, stat
myconnection = As New ADODB.Connection
If myconnection .State Then
stat = true
else
stat = false
end if
Any thoughts please??
Most greatful.
Bravo Two Zero
A pen is mighter then a sword.
|
|
|
|
|
QUESTION 1: how to choose between VB.NET/C#/VC.NET?
With all due respect, VB.NET seems to have it all:
a. better code samples and documentation... too many examples: DMO/ADO/... I wouldnt want to waste time with C++ trying to figure out some API that couldnt have been so easy to program if proper documentation is available (and in many cases, such docs is available, but to VB and C# only)!
b. speed - not slower than VC.NET isnt it (since all compile to IL)?
c. best dialog editor
d. ease of use (and now it's multithreaded + object oriented)
e. most likely to attract a large user base?
VC seems like an obsolete tool. well, a low level dev tool perhaps (where u want to create buffer overflow). And VB.NET seems like to be the tool that get the job done and done fast.
QUESTION 2: according to code project and code guru forums membership statistics, it seems VC6 is still a much more popular/dominant development tool. but perhaps this is because codeguru and codeproject are both C++ sites?
QUESTION 3: any good sites for VB/VB.NET forums? downloads/tutorials?
What do u think? Correct me if i'm wrong since I do wish to pick the right tool for future development projects.
norm
|
|
|
|
|
norm wrote:
With all due respect, VB.NET seems to have it all:
b. speed - not slower than VC.NET isnt it (since all compile to IL)?
c. best dialog editor
d. ease of use (and now it's multithreaded + object oriented)
e. most likely to attract a large user base?
b C# is as quick
c. C# uses the same dialog editor
d. C# does all that with a decent syntax to boot
e. C# will attract all comers, where VB is for IT Journalists and managers.
f. C# is designed for .NET, where VB is bodged for backwards compatability
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Slow down with the great VB quotes already !!!! :P
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
norm wrote:
With all due respect, VB.NET seems to have it all:
LOL - yeah, that's it......
norm wrote:
better code samples and documentation
Ya. You see, C++ programmers are smart enough to convert from VB samples to C++ on the fly, so often things are only documented in VB.
norm wrote:
speed - not slower than VC.NET isnt it (since all compile to IL)?
Wrong - C++ IL is actually optimised. Microsoft made a big deal of this to try and get C++ programmers to subject their code to an intermediate runtime.
norm wrote:
best dialog editor
I'll give you this, although I'm told only until Feb.
norm wrote:
ease of use (and now it's multithreaded + object oriented)
This is subjective. I am using VB at work and I think it's a pig of a thing.
norm wrote:
most likely to attract a large user base?
Not a chance in hell. C# is where the action is.
norm wrote:
VC seems like an obsolete tool.
norm wrote:
well, a low level dev tool perhaps (where u want to create buffer overflow).
Well, just because you've never had to be smart enough to manage any memory does not mean a C++ program, properly written, should have a chance in hell of having a buffer overflow. None of my code has or will ever suffer from this problem. You're thinking of C.
norm wrote:
And VB.NET seems like to be the tool that get the job done and done fast.
Getting the job done fast, and barely adequately, has always been VB's claim to fame. But why do you think we have C# ? Because even if VB ever turns into a real programming language ( and with .NET it's probably close, seeing as they all target the same IL ), the name of VB is beyond repair, it has been associated with too many crappy hack programmers writing too much bad code for too long. C# will replace VB within a couple of years. Already C# has a fair bit over VB.NET ( I know you read that thread, so I won't link to it ), and with more to come, Microsoft are trying to channel both real programmers, and VB heads into using C#.
norm wrote:
according to code project and code guru forums membership statistics, it seems VC6 is still a much more popular/dominant development tool. but perhaps this is because codeguru and codeproject are both C++ sites?
I've read a bit from VB programmers who hate VB.NET because it has changed so much that they cannot wrap their heads around it. However, at work we still use a lot of VC6, because we work on legacy code and I don't see why the VB world would be any different.
norm wrote:
any good sites for VB/VB.NET forums? downloads/tutorials?
Try here.[^]. Seriously, I don't know, but if you're at the learning stage, you're making a serious mistake if you target VB.NET. If you don't intend on ever doing any serious programming where performance counts, I'd be going for C# all the way.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
"I'll give you this, although I'm told only until Feb."
> what? in feb we'll get a dialog editor for VC?
norm
|
|
|
|
|
I believe that is part of the next version, yes.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
thanks, good to know.
norm
|
|
|
|
|
norm wrote:
a. better code samples and documentation...
I have noticed this too. Allthough I honestly don't spend alot of time looking for code examples of things done in C++, I just don't see the amount of examples that I do for VB.
norm wrote:
b. speed - not slower than VC.NET isnt it (since all compile to IL)?
Again, I have to go by experiance here. I ran some tests way back using VB6 and VC6 and VC was faster at most things. However, when I looked at the differences in speed for what I was using it for VS. the knowledge that I already had vested in VB6, VB won hands down. I was not writing timing critical code, nor was a writing anything that HAD to be done tight. When I DID have an occasion to do something time critical I wrote a DLL and called it from VB.
I have not done any comparisons in .NET between the two, but I stil belive that VC will be a bit (albeit maybe not too much) fatser than VB.NET/C#
norm wrote:
c. best dialog editor
Hands down here I think you are right. I have not seen Everrett (sp) but I think this has been one of the things that have made VB and C# a very attractive language for most developers. I hate using VC resources to design dialog boxes, and MFC always seemed like a PITA to me. I like being able to address a text boxes text by using TextBox1.Text.
norm wrote:
d. ease of use (and now it's multithreaded + object oriented)
I am a firm lover of VB (so I have to admit that I AM Biased here). VB finally got the shot of steriods that it neded to compete with the other languages.
norm wrote:
e. most likely to attract a large user base?
I really disagree with this one though. I think in the long run C# will be the langauge of choice for most new developers. I ahev to admit that VB seems like it was only included in .NET because of the years of legacy code that is already in place for alot of companies. Allthough I still firmly belive that VB is a first class language, I can see the handwriting on the wall that says that things are progressing and that C# is the way to go from now on.
Does that mean that I am dropping VB all together? NOPE, not on your life. But new things that are intended to be wround for the long term will be done in C#.
Hope this helps.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
What A** decided to make collection items start at index 1 and arraylist items start at index 0?
Is it this way in C#?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
I believe from something I read in a magazine this week that VB has always had 1 indexing, and certainly ArrayList, as it is part of the .NET Framework, does it properly and starts at 0.
I have to use VB at work at the moment. I feel so dirty.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
I believe from something I read in a magazine this week that VB has always had 1 indexing
Yeah, but there used to be a way to force it to use 0 based indexing... Looks like like that is gone now... This is just one of those annoying things that makes VB seem.. Oh, I don't know...
I guess I will use 'odd' for lack of a better (more PC) term at the moment. Don't get me wrong, I love VB because I am used to it...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Christian Graus wrote:
I have to use VB at work at the moment. I feel so dirty.
I have a feeling this will appear as someone's signature soon. CG, so you are using VB at work now?
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
I've always had to use it from time to time, I hate VB from exposure to it, not from assumptions or because it's trendy to do so. Right now we are writing a COM dll to bridge ASP and ASP.NET sessions and VB simply makes sense because to do so in C++ would be so much more verbose. I still would have done it in C++, but my boss presented a 60% done project in VB.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
VB simply makes sense because to do so in C++ would be so much more verbose.
I never thought I would hear/read you utter those words, however I do have to agree as to do somethings in VB are much faster than C++, however there are many things as I am learning that can be done in C++ that just can't be done in VB.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Nick Parker wrote:
however there are many things as I am learning that can be done in C++ that just can't be done in VB.
Absolutely. I have to write my own linked list because VB does not provide one. How is that remotely a programming language ? But as I said, if I had started it, I would have done it in C++. We still haven't figured out how to debug our dll. And the syntax is just crap. There are so many examples of design with no thought for the consequences, it's really quite frustrating.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|