|
Hi all..
I am a very new person in developing this web application using vb.net. Just wondering something, hope someone out there could reply to my question. Well.. in the aspx form, the html code, sometimes i'd see vb coding in <%.. %> tags.. when do the codes in the coding be trigger? how do you use it?
Thanks..
a very confused new starter
|
|
|
|
|
Thoese characters are the asp code delimiters, meaning they were/are used in "ordinary" asp development to tell what is script-code and thus needs to be handled by the server before the document is created and sent to the browser.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Somebody knows some function to generate the numbers of the bar codes EAN13? With 12 characters of data and the 13th digit as check digit. How the code EAN13 is generated?
|
|
|
|
|
What's wrong with typing "VB.NET EAN13" into Google?
Here, let me do it for you...clicky[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I want to interact with OS (Windows)'s buffer, exp: write, read or manager OS's buffer. What is code in VB.Net or C# to do it.
Thanks.
|
|
|
|
|
Huh? This does not make sense. Which buffer are you talking about?
...Steve
|
|
|
|
|
LOTS more explaination is needed here! What buffer? Which API are you using? If this buffer part of your app or another app? What are you trying to do with this buffer?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on a tool for Data Services, and decided to create the tool as a VB.NET windows application. I am not a VB .Net developer, but know enought to get by, though I struggle with the controls because I've never used them (I have used VB 6 controls).
The purpose of the App is to Update an online questionnaire, the questionnaire has branching...etc.
So far, I open a form that Loads two drop down boxes. 1st drop down loads companies, second drop drown is bound to questionnaires for the company selected. You then select the questionnaire being updated.
Then I use Common Dialog, open file, to select an Excel spread sheet that has the new questionnaire stucture, with new questions.
You then click on "Update" and the excel spreadsheet is loaded into a datatable, and the existing "Active" questionnaire is pulled from the DB into another datatable. I then do a row by row comparison against the spreadsheet and the existing version comparing things like question text, answer label, incorrectness of question....among other things, in order to determine if there are new questions being submitted, other wise, I want to use the existing question. some of these take human interaction in order to determine if the question is new. Although I scrub the excel data down, there are still things you cant possible take into account.
So after doing all my comparisons, in instead of popping up a message box every time somethiing is different (there are hunderds of rows and this woudl be annoying) I would like to mark (flag) differences and then when comparison is complete, open up a new form with a with a check box by each possible new question, so the user can validate, by going through and checking what IS actually new.
What control should I use? A listview? I want a checkbox on the left. I would also like to change the background color of the part that has actually changed. Say for instance, the question text changed, or the Answer text changed, of if the incorrectness changed, then mark that.
Thanks in advance for time in effort in this matter. Also, any good resources on the recommended control would be gread.
Shawn
|
|
|
|
|
I don't think you really have any options that will support everything you describe.
There is a CheckedListBox, but no control over the colors.
You might could write enough code to make the intrinsic NET DataGrid control do what you want to do, but it would take a lot of work.
What you really need for this sounds like probably a 3rd party grid, like ComponentOne (the old Apex True Grids) - they generally give you a lot more control than you have over Microsoft controls.
This would have been a lot easier to do in VB6 because you could create your own custom row control ocx and use the DataRepeater to make it into a grid.
VB.NET does not provide a DataRepeater but you may still be able to import the DataRepeater into a NET project and do it that way.
|
|
|
|
|
i use a module containing the sub main.
in this module there's notifyIcon and an object (objX) of Form (X).
doing one of these:
objX.Visible=true
or
objX.Hide=true
causing all of the application to treminiate
is there and way to hide the form without minimizing it and closing the appliction.
with considering the notifyIcon.ContextMenu has a show menuItem and Hide MenuItem?
militiaware - VB.NET
Militiaware
|
|
|
|
|
Override your startup form's OnLoad sub and set it's Visible property to False. If that doesn't work for you, set your form's Opacity to 0. If you need to show the form again, either set Visiblity = True or Opacity = 1.
Public Class Form1
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
MyBase.OnLoad(e)
Me.Visible = False
Me.Opacity = 0
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok, so i have a rich text box, txtMain. i need to add a sub that changes the text i specify to bold face. but format cant' do it. and the way the designer does it changes all the text instead of just some. is there a way to specify what text is bold? and maybe incorporate a Font dialog also?
|
|
|
|
|
can no one help me? all i want to do is bold the selected text in a rich text box.
|
|
|
|
|
Hi,
I am currently trying to load the Boot.ini file from C:\ to a RichTextBox in VB.NET. The code I currently use is:
Private Sub frmConfigFiles_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
bootini.LoadFile("C:\Boot.ini")
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
However, when the form loads, I get the following exception:
File format is not valid.
Is there any way I can allow user's to view and edit this file??
|
|
|
|
|
RTF is not the same format as a plain text file - it contains hidden fields for formatting etc.
Although you could read the boot.ini file into a multi-line textbox allow the users to edit it, then save it back to the ini file, I don't think this is a particularly good idea. Anyone who knows how to correctly edit the boot.ini file would know how to edit it from notepad. Anyone who does not know how to do this probably should not be editing it in the first place.
The only thing that is supposed to be in the boot.ini file are the OS descriptions anyway.
If you want to create an app that allows the user to change these, you should write an app that presents them with the three options they can change in the boot.ini - the order in which the available OS are presented, the default OS to boot, and the timeout. Then your app should handle modifying the ini file internally.
If anything else is changed in the ini file, all you've done is corrupt the system.
|
|
|
|
|
OK, I have looked in the registry and have found the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control and found the following, SystemBootDevice, SystemStartOptions, WaitToKillServiceTimeout.
Are these the options which you are refering to??
If not how would i go about reading boot.ini to a mutli-line text box.
Also, i will read it to a read only box first, then the user can click edit to open a new window which they can then edit this file in.
-- modified at 17:47 Sunday 25th September, 2005
|
|
|
|
|
No, the options I am referring to come directly from the boot.ini. Here is what mine looks like:
--------------------------------------------------------------------------
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
--------------------------------------------------------------------------
What this means is I have two partitions, 1 has WINNT, 2 has WIN XP.
When my machine boots, the screen comes up with WINNT option listed first, WINXP listed second. That is controlled by the order of the two entries in the [operating systems] section.
If I change the order of the two entries, and NOTHING else should be changed in that section ORDER IS THE ONLY THING YOU CAN CHANGE! then Win XP would appear as the first option instead.
My machine also defaults to WINNT. If I changed this to:
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
then Win XP would be already selected, even if it was not the first in the list.
And timeout is set to 30 - if I do nothing then after 30 seconds the default OS is loaded.
Those are the options controlled by BOOT.INI file.
So instead of using a multiline textbox, I would use for example, a textbox where the user can change the time out value from 30 seconds to whatever.
Then I would use a list box, and add items into it "Windows 2000", "Windows XP" and let them select which they wanted as their default OS.
I would not bother with giving them anything to change the order the OS options appear. I would just write code so that whenever they select a default, that option is automatically moved to the top of the list.
You can open the file and parse it manualy line by line, or you can use built-in Win32 APIs that are specific for wsorking with INI files that will read and write them without you having to parse them by line.
But most users who even have partitions and multiple windows versions configured are "advanced" users. The average user only has one version of Windows installed, so the only option they would have to even change would be the timeout. So I am not sure why you really are even interested in this at all?
But if you want it, I have a module written in VB.NET that wraps the INI APIs into simple function calls that will read and write an INI file with no parsing etc....
|
|
|
|
|
It would be great if you could share the module with me.
Either post here or email administrator@planetnvidia.com.
Thanks for you help.
|
|
|
|
|
Hi all,
I have a serialization class with following procedures.
Public Shared Sub Serialize(ByVal Obj As Object, ByVal FilePath As String)
Dim fs As New FileStream(FilePath, FileMode.OpenOrCreate)
Dim sf As New SoapFormatter
sf.Serialize(fs, Obj)
fs.Close()
End Sub
Public Shared Sub DeSerialize(ByRef Obj As Object, ByVal FilePath As String)
Dim fs As New FileStream(FilePath, FileMode.Open)
Dim sf As New SoapFormatter
Obj = sf.Deserialize(fs)
fs.Close()
End Sub
As it can be guessed, these methods are used for serializing and deserializing objects.
I have a class to be serialized
<serializable()> public class SampleClass
Private Value as Integer
Private Items As New ArrayList
end Class
When I serialize this class, the output will be shown like the data below.
(That shows the class has been successfully serialized)
(PLEASE IGNORE THE NAMES AND VALUES IN THE DATA - IT IS ONLY A SAMPLE)
.....
......
<arraylist_x002b__version>6
<soap-enc:array id="ref-5" soap-enc:arraytype="xsd:anyType[16]">
<item href="#ref-6">
<item href="#ref-7">
<item href="#ref-8">
<item href="#ref-9">
<item href="#ref-10">
<item href="#ref-11">
<a5:uniqueentity id="ref-6" xmlns:a5="http://schemas.microsoft.com/clr/nsassem/PDPweb.Entities/PDPweb%2C%20Version%3D1.2.2094.37416%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_Name id="ref-12">ID
<entity_x002b__type>UniqueIdentifier
<entity_x002b__required>true
<entity_x002b__check xsi:null="1">
......
......(continues)...
But when I try to deserialize a class (from the data file), only the
"Private Value as Integer" variable is deserialized.
How can I also deserialize an arraylist?
Best Regards
Emre YAZICI
|
|
|
|
|
Dim obj1 As Object
OLE1.Action = 7
Set obj1 = OLE1.object.Application.WordBasic
obj1.Selection.TypeText ("Hello")
'Control Word in OLE
'Error occurs at last line, which is :
'Run-time error '424'
'Object required
'And I use office xp, can I use macro recorded in
' word directly in VB without
' modifying, if can not, how I modify them can be use in VB.
|
|
|
|
|
hi there i have an image i want to save it in access database i want to save the image not the path im using this
Dim tr AsNew ZieZoDB
Dim conn As OleDbConnection
conn = Me.OleDbConnection1
Dim fs As FileStream = New FileStream(OpenFileDialog1.FileName, FileMode.Open, FileAccess.Read)
Dim s AsString = Me.txtimagepath.Text
'Read the output in binary reader
Dim r As BinaryReader = New BinaryReader(fs)
'Declare a byte array to save the content of the file to be saved
Dim FileByteArray(fs.Length - 1) AsByte
r.Read(FileByteArray, 0, CInt(fs.Length))
and here is the problem in this query
Try
Dim dbclass AsNew ZieZoDB
Dim query AsString
query = "INSERT INTO [StudentInfo] ([StudentID], [StudentImage], [StudentCardNumber] , [StudentName]) VALUES
('" & Me.txtstudentid.Text&"' ,,(???????????),'" & Me.txtcardnmber.Text & "', '" & Me.txtname.Text & "');"
dbclass.executeNonQuery(query)
what should i put for the image in the query to save thanks
sam
|
|
|
|
|
Dim rs As New ADODB.Recordset
Dim Rss As New ADODB.Stream
rs.Open "select [StudentID], [StudentImage], [StudentCardNumber], [StudentName] from [StudentInfo]", cn, adOpenStatic, adLockOptimistic
Rss.Type = adTypeBinary
Rss.Open
Rss.LoadFromFile OpenFileDialog1.FileName
rs.AddNew
rs.Fields("StudentID") = Me.txtstudentid.Text
rs.Fields("StudentImage") = Rss.Read
rs.Fields("StudentCardNumber") = Me.txtcardnmber.Text
rs.Fields("StudentName") = Me.txtname.Text
rs.Update
rs.Close
|
|
|
|
|
thx 4 ur reply i wanna ask u with this way if i have an empty textbox can i save the data
because for example i dont hve the whole information of the student but i have to save the other data and thanx again 4 ur reply
sam
|
|
|
|
|
You can take a test with empty textbox to write to database, to see if you can do in this way. And if you can, you can open the database file in Access to take a look what value is store in it.
|
|
|
|
|
Private Sub Form_Load()
Combo1.Text = "1&2&3"
'I want to display "1&2&3" but it displays "123"
End Sub
|
|
|
|
|