|
Does anyone use VB.NET standard rather than Visuual Studio .NET?
Is there a downside if you only want to write apps in VB.NET?
|
|
|
|
|
No down side really, but it depends on the type of apps you want to write. The Standard Edition is the entry level version of VB.NET. You loose all the Enterprise features, including the ability to develop for PocketPC, SourceSafe, , and gain none of the Academic version features.
RageInTheMachine9532
|
|
|
|
|
Hiya,
I've created a simple vb.net windows service, and I'm trying to peroidcally run a batch file as part of the service but it's not working..
Here's the code
Dim myProcess As New Process()
myProcess.StartInfo.FileName = "c:\batchfile.bat"
myProcess.Start()
Any ideas why this will not work? No errors are thrown and when stepping throught the code with the debugger, all seems well.
Cheers,
stuart
p.s. I'm an amatuer.
|
|
|
|
|
It doesn't thow an Exception because the code can sucessfully launch the batch file. It is the batch file that is probably having the problem because of NTFS rights issues.
Is you service running under the LocalSystem account or is it running under a user account? Does this account have the proper rights to the files your trying to manipulate? Does this batch file do something with a Network file? Local System will not have the rights to anything that is on a network share...
RageInTheMachine9532
|
|
|
|
|
|
Dear all,
I am getting to grips with writing VS.NET add-ins with a view to publishing an article on here. I am considering making the add-in modular, that it dynamically detects and adds new features rather than having to run the whole installation again, kind of like a snap-in. Anyway, that's by the by.
Complete the statement below with a genuine requirement and I will see what I can do to add your wishes into my add-in.
I wish I had an add-in (for VB or C#) that......
I have a couple of features in there right now:
1. Select text and wrap in new region
Dim a as string
a = "hello"
becomes...
#Region "My Region"
Dim a as string
a = "hello"
#end region
2. Paste a SQL statement in to code and have its individual lines added to a string variable
SELECT *
FROM mytables
ORDER BY 1
becomes...
Dim lSQL as string
lSQL = "SELECT *" + "\r\n";
lSQL += "...
3. Select member variables of a class and the add-in creates the property let/get code for you
4. Select a database and some tables and the add-in creates classes whose members map to columns on the tables.
Any more?
Chris
Nursey
|
|
|
|
|
I am writing a program to solve the rubik's cube.
For details of the algorithm, google "cube explorer"
My problem is this, I need to write 2 HUGE tables, but the values in each position in the table are either 0,1,2 or 3. The smallest datatype I know of is the byte, but this (2186)x(2047)x(494) table gives me an error of system out of memory.
Could someone help me out?
Thanks
Fox
|
|
|
|
|
At 1 byte per element, this would require about 2.2 GIGABYTES of storage.
You can get away with mapping multiple bytes into an array of 69,078,830 UInt32 elements. This will allow you to get 4 of your bytes into one UInt32.
Since the values 0, 1, 2, and 3 will fit into 2 bits, you could map this into the UInt32 even more efficiently and pack 16 values into one UInt32.
In either case, you'll have to manage the array indexing yourself. The easiest way to do this is to create a class that can create an internal array of UInt32's that will hold the capacity of 2,210,522,548 two bit values that you need. Then you'll have to expose an Index property that can take 3 arguments as index values in your 3D array. You'll use those values to caluclate which UInt32 has the two bits your looking for.
RageInTheMachine9532
|
|
|
|
|
Any ideas how to specify a start page for the webbrowser control, similar to IE's "Start Page" feature? The WebBrowser control only seems to want to load pages from an open dialogue or a button, it doesn't like code in the form load section.
Any help would be great!
|
|
|
|
|
I am getting a little closer by adding the following to the Sub New ()
brweb.navigate({url}) ' {url} being a string
Except now the webbrowser control hangs with the hourglass. Can't figure it out.
|
|
|
|
|
..and register it on the server.
I am really struggeling now, and hope someone can help me.
I am using the SmtpMail class and MailMessage Class to send mail, but I want some response from the server too, and after A LOT OF READING I came to the conclusion that I need to make a transport event sink that is triggered for every mail I send to the smtp server.
I also came to the conclusion that I have to use the smtp Message Envelope Fields to be able to get the info I need back from the smtp server. I ie. need to now if the connection to the server was ok every time I try to send a mail, if a mail was successfully sent or not, and to fetch the headers of the mail and write them also to the log file. I am not sending mail to the drop directory.
I even (after a long research) found found an example in the msdn using VB or VB script to fetch values from the server in so matter and write it to a log file, but I cant get it to work and there are several things I do not understand.
The msdn mentions the use of the script smtpreg.vbs to register a script containing a OnArrival event on the server. And the script is to simplify using SEO(Server Extension Objects), but they never mention what to use if you do not want to use the script. This is so frustrating.
I am not using scripting, I am programming a windows application in VB.NET. Is the example for VB 6, or what am I missing ?
This is the example:
Creating an SMTP Message Log File
The following example of an event sink creates a file called Events.txt and then copies the From, To, Subject headers and TextBody of the messages into the file. Each message that arrives is appended to the file. The format of the file is as follows:
From: (from header)
To: (to header)
Subject: (subject of message)
From: (from header)
To: (to header)
Subject: (subject of message)
...
The following example is presented in two versions: using C++ and the Microsoft® Active Template Library (ATL) and using Microsoft® Visual Basic®. See Sink Example Using C++ and ATL and Sink Example Using Visual Basic.
© 2000-2001 Microsoft Corporation. All rights reserved.
CDO for Windows 2000
Sink Example Using Visual Basic
The following sink example uses Visual Basic to create the log file. To function, the project (Microsoft® ActiveX® DLL) requires a reference set to the following type libraries:
· Microsoft® ActiveX® Data Objects 2.5 Library (MSADO15.DLL)
· Microsoft® CDO for Windows® 2000 Library (CDOSYS.DLL)
· Microsoft® Server Extension Object COM Library (SEO.DLL)
· Microsoft® Scripting Runtime (SCRRUN.DLL)
Implements CDO.ISMTPOnArrival<br />
Implements IEventIsCacheable<br />
<br />
Private Sub IEventIsCacheable_IsCacheable()<br />
' just returns S_OK<br />
End Sub<br />
<br />
Private Sub ISMTPOnArrival_OnArrival(ByVal Msg As CDO.Message, EventStatus As CDO.CdoEventStatus)<br />
Dim fs As New Scripting.FileSystemObject<br />
Dim file As Scripting.TextStream<br />
Set file = fs.OpenTextFile("e:\script\test.log", ForAppending, True )<br />
file.Write "From: " & Msg.From & vbCrLf<br />
file.Write "To: " & Msg.To & vbCrLf<br />
file.Write "Subject: " & Msg.Subject & vbCrLf & vbCrLf<br />
file.Write Msg.TextBody & vbCrLf & vbCrLf<br />
file.Close<br />
EventStatus = cdoRunNextSink<br />
End Sub
I do not understand the event structure and how to use the interfaces.
In Visual Studio when I implement CDO.ISMTPOnArrival and SEOLib.IEventIsCacheable, I Can select ISMTPOnArrival and then select CDO.onArrival from the combo boxes in the code window and this then become my sub-structure:
Public Sub OnArrival(ByVal Msg As CDO.Message, ByRef EventStatus As CDO.CdoEventStatus) Implements CDO.ISMTPOnArrival.OnArrival
Why is this different from the structure in the example and How do I make the event in the example to work?
Is the reference to SEOLib automatically supposed to register the vb class that contains OnArrival
on the server ? Or do I need to do semething more to get the sink registered ?
Can anybody help me please ?
|
|
|
|
|
hopefully im not being an annoyance with my repost but i cant seem to find anything for help with this.
can someone please help me out on using MIDI instruments with vb.net? like, on how to make a simple MIDI piano player-type program, but in vb.net? i have downloaded some of the midi examples on CP, but most dont work because i dont have VS6 or 7, which is what the examples i can find are in. also they are mostly written in C# or C++, im sure there is a way to do it in vb.net... right?
i want to rebuild my midi-based guitar assistant-type of program i wrote afew years ago in vb6, into vb.net
Thanks in advance.
------------------------
Jordan.
III
|
|
|
|
|
Im using VB.Net and loading a page that has a high-res image as its background. Depending on certain variables "different" images are then overlaid on top of this. (up to 10 images)
My problem is that when the page loads it flickers for a slight second as the secondary images are loaded over the primary image.
Is there any way to cut down on this flickering ? Bouble buffering springs to mind but I dont have a clue where to start...
Any help at all will be greatfully recived.
All the best Paul.
|
|
|
|
|
Hi, Sir.
I convert vb 6.0 project to vb.net.
The problem is UserControl in vb 6.0 has AsynReadComplete event but vb.net is not.
Do you know how to solve this problem.
Thank You.
|
|
|
|
|
hi to all
i am new to vb.net.i need some help in binding the controls to the dataset in ado.net.
i want to attach comboboxes in my form with the through displaymember and valuemember properties to the tables.
suppose as a test case if i have 2 combos for dept,desig. when ever i select a particular dept then the desig combo should show only the designations in that dept dynamically.
i can't attach the original table directly as the rows in the original disig table changes dynamically ...
for this if i manually add these values dynamically through a datareader into these combos then settng the valuememeber values will be difficult (may not be possible).and these combos are not bound then the changes to the table will not be refreshed automatically.
At present i am creating one temporary table for each of these combos (here it requires 2 tables) and fill the data rows that match the crieteria through an adaptor.(not attaching the original tables)
its working fine. "but i am concerned about the performance and optimization of my application.
Is this approach is correct. or is it better to use views in place of tables.
will it consume less memory than the tables cosume ?.
Or is there any other way to achieve this task ?
any body please help me out.
thanx in adv.
Mohan G
Mohan G
|
|
|
|
|
Does anyone have any sample code which will show me how to load all the Microsoft exchange 2000 servers within the organisation into a dropdown combo box?
Thanks
Regards
Mohammed
|
|
|
|
|
Okay, I've not done any Visual Basic programming for the longest time and can't realy remember much in the way of technique, but I do remember the OLD functions: PEEK and POKE. I didn't realize till just the other day that VB.NET dosen't have them. SO... I did as every person with common sence would do: Search the internet. All I've found were sources/help/etc. on older versions of VB. I only have .NET since I got Studio .NET for school. Other than the older VB code and help, I've found nothing else on workarounds for those two commands.
If any of you have a good work around I could use or help me out w/ developing a DLL (or OCX, if that's what VB uses if I remember correctly) in C/C++ (I can do C/C++ but to an extent, I'm fairly new and well, the college I'm going to isn't too helpful on advanced things. They seem to focus more around database development) so that I could use PEEK and POKE as functions in VB.NET, it would be GREATLY appreciated.
|
|
|
|
|
PEEK and POKE were wrappers around memcpy , what do you need this for?
- Nick Parker My Blog | My Articles
|
|
|
|
|
Me and a bunch of friends used to make little simple games and we'd have little challenges to see who could make a trainer for it first. It was pretty fun. We had 2 teams and each one made a game and tried to hide their vars as well as they could and the other team had to kinda make a trainer without cracking the game. ANYWAY, I only have VB.Net to write the little trainer-type programs. I also want to try my hand at writing a game trainer in VB.NET. I like the idea of having it in a nice windows GUI (and I don't know how to do that in C++.NET yet).
|
|
|
|
|
There's a few articles on CodeProject about something like that. It's used with Minesweeper...just search for Minesweeper in the Articles section and you'll find them.
RageInTheMachine9532
|
|
|
|
|
I am a beginner in VB. I want To use Crystal report.where from I access it?
|
|
|
|
|
Add a new item to the project, and it's one of the options....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have an application which works fine on my home computer, however when I try to run the same application over the network on the computer in the office I get an error
An unhandled exception of type system.security.securityexception occurred in MSOTest001.exe
Addtional information:System.Security.Permissions.SecurityPermission
This error is driving me nuts...I hope there is someone who can advise me as of what to do.
Thanks
Regards
Mohammed
|
|
|
|
|
Hello,
Does your test app access the file system or anything else like that? Running an app from a network share is a security risk. So .NET sandboxes the app and doesn't let it do certain things. If you try copying the application to the harddrive, does it still cause the security exception?
To fix the problem of sandboxing you will need to grant the application permissions to run from the network.
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
im trying to catch the way to start, im coming from Borland programming style, i want to start an application that uses SQL Server and VB.NET (C#) but reading tutorials i have noticed that people talks about ADO.NET, i thinks its an intermediate between the app and the server. my question is if ADO.NET is necesary? or are another way to work (like Delphi and Interbase direct connection)
thanks
Markitoz
|
|
|
|