|
You speak.. . as if... as if I had a choice...
|
|
|
|
|
Yah, a newbie would be looking into that upgrade/wizardy thing and praying, you are right, reality is you have to rewrite. Look on the bright side, at least the specs are fairly solid.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yeah, ur correct. lots of problem encounter/bugs if i will use a tool. specially in database thing.
anyway thanks guys. i'll start it with scratch.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Hi All
I have a problem....
I want to add a dropdownlist to a datagrid in a GUI application.
This can be done using the [DataGridViewComboBoxColumn Class]
But my problem is this class is only available from .Net Framework 2.0
And i can only use Framework 1.1
Is there any workaround i can use?
I thought about designing a new DataGrid(by Inheriting the standard DataGrid Class)
Is this possible or is there another way to do this?
Any help would be appreciated.
Regards,
Josef
SO? No Help at all? I'm disappointed CP!!
Don't worry, i used 2.0
How to solve a Programing error:
1. Spell check
2. Debug
3. http://www.codeproject.com
modified on Monday, January 11, 2010 6:18 AM
|
|
|
|
|
Dear All,
Now I want structure to similar treeView or listview but the format is like that:
Company_ID------Company_Name----Address--------xxxx------xxxxx (Note: Filed Name)
+ 001-----------Com A-----------st154----------xxxx------xxxxx (Note: Record)
------- + contact Person
--------|------Name------------Position--------Email (Note: Field Name)
--------|------Mr A------------Admin-----------mr.A@yahoo.com (Note: Record)
--------|------Mr B------------Finance---------mr.B@yahoo.com
--------+ Products
--------|------Name---------Kind--------Expired-------xxx-----xxxx
--------|------Pro A--------A-----------1/1/2010------xxx-----xx
--------|------Pro B--------A-----------1/1/2010------xxx-----xx
--------|------Pro C--------B-----------1/1/2010------xxx-----xx
+ 002-----------Com B-----------st154-----------xxxx------xxxx (Note: Record)
--------+ contact Person
--------|--------Name--------Position--------Email (Note: Field Name)
--------|--------Mr C--------Admin-----------mr.A@yahoo.com (Note: Record)
--------|--------Mr D--------Finance--------mr.B@yahoo.com
--------+ Products
--------|--------Name--------Kind------Expired
--------|--------Pro Q--------A -------1/1/2010
--------|--------Pro W--------A --------1/1/2010
--------|--------Pro E--------B --------1/1/2010
Example above is have 3 tables but there relation by Company ID
When I click on + the sub (contact person, Product, and ...) it will show.
and when i click on + of subs (contact person or product...) it will show their data.
I would like to say sorry if my wrote is not clear.
What any tool that can make like that ?
Can you send me the source code ?
Thanks you.
VB.Net
|
|
|
|
|
I would have thought a dataGridView would be a better solution than either Tree or Listview.
Infragistics has a an OutlookExpress style on their treeview that will allow a treeview with columns.
There is an A Much Easier to Use ListView[^] here on CP that does the same and it is free.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have a program that requires several prerequisite programs (such as the Office 2007 compatibility pack). Is there a way for me to write an install program that has these additional programs included (as some sort of resource) that I can launch, wait for the program to exit, and then run the next one, finishing with copying my software and files to a target directory? I know how to execute programs and wait for then to finish through code, just not to sure about how to add multiple EXEs inside a single EXE and execute them individually. I was thinking of adding them almost like how you add icon files and such. Any direction on this would be greatly appreciated.
Dominick
|
|
|
|
|
There may be a more clever way to do it, but for the general case, you should be able to pack them as resources (As you said, just like icons). When it's time to run them, write them out to a temporary file, execute that file, then delete it.
If you want to delve into unmanaged code and REALLY hack it up a bit, there are ways to supply a pointer to the embedded resource and execute it directly... But I wouldn't suggest that route.
|
|
|
|
|
why not just use the pre-requisite packaging feature of the VS Installer project? You should code for the app being missing anyway, and give a nice message to tell the end user to install the missing app.
|
|
|
|
|
Okay...when I decided to read out the files to a temporary file and execute them from there. For a quick test I wrote code that would read the files out byte by byte and the following code worked fine:
Dim sWriter as Stream = Me.GetType.Assembbly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." "JBX2JBN IV.exe")
Dim x as Integer
Dim fFile as New FileStream(TemporaryFolder &" \JBX2JBN IV (Copy).exe",FileMode.OpenOrCreate)
For x = 1 to sWriter.Length
fFile.WriteByte(sWriter.ReadByte)
next
fFile.Close()
After that worked I decided to try and increase speed/performance I would read out chuncks of data and write them to the temporary file. However, when I try the following code it doesn't work:
Dim sWriter As Stream = Me.GetType.Assembly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." + "JBX2JBN IV.exe")
Dim x As Integer
Dim fFile As New FileStream(TemporaryFolder & "\JBX2JBX IV (Copy).exe", FileMode.OpenOrCreate)
Do
sWriter.Read(buffer, 0, 4096)
fFile.Write(buffer, 0, buffer.Length)
Loop While sWriter.Position < sWriter.Length - 1
fFile.Close()
After trying the second block of code however, the file won't run. I get the following error message:
The application failed to initialize properly (oxc000007b). Click on OK to terminate the application.
FYI I declared buffer as Dim buffer(4096) as Byte .
Thanks.
|
|
|
|
|
Alright I got it to work. I changed the code to the following:
Dim buffer(4096) as Byte
Dim sWriter As Stream = Me.GetType.Assembly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." + "JBX2JBN IV.exe")
Dim x As Integer
Dim fFile As New FileStream(TemporaryFolder & "\JBX2JBX IV (Copy).exe", FileMode.OpenOrCreate)
While (x < sWriter.Length)
x += sWriter.Read(buffer, 0, buffer.Length)
fFile.Write(buffer, 0, buffer.Length)
End While
fFile.Close()
Thanks for the help.
|
|
|
|
|
Hi All
I have created a macro to identify a word "and" and highlight it in a word document
First Look at my Macro Function
Public Sub AmESerialComma()
CheckDate
TurnOnTrackChanges
Call Home
With Selection.Find
.ClearFormatting
.Text = ",[!.]@ and [!.]@."
.MatchWildcards = True
.Execute
Do While .Found
With Selection.Range.Duplicate
.Find.Execute FindText:=" and "
.Start = .Start + 1: .End = .End - 1
.HighlightColorIndex = wdBrightGreen
End With
.Execute
Loop
End With
Call Home
RestoreTrackChanges
End Sub
My problem is that when it Goes In "With Selection.Range.Duplicate" Loop the first time it Capture "and" & highlight it .but next time "Selection.Range.Duplicate" is always comes Empty..So its going in Infinite Loop...
Can Any Body solve this problem,,I think after Highligting the text its not getting out from loop..
Please Show me some way
|
|
|
|
|
Hi,
I suppose the answer to this question is simple but I can't seem to find it anywhere.
What I would like to know is:
How do you set the properties of a "FontDialog" box before it opens ?
All I want to do is make it start up with font type "Arial UNICODE MS" at 20 point size instead of the usual "MS sans serif" with 8 point size.
I can't do it now because I am always getting "read only" error message when I try to change anything.
Anybody out there that can point me in the right direction ?
Many thanks for anyone who does.
|
|
|
|
|
Hi again,
Found it in the mean time.
The answer is to modify the ".Font" property of FontDialog. That one is modifiable and it works a treat.
All for now.
|
|
|
|
|
Hi,
I have build application in vb.net 2005 and using Access 2003 database.
When i am compressing database then it is showing error message which is below.
"Could not load file or assembly 'Interop.DAO, Version=5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Any one can suggest me what i am doing wrong and when this type of error occurred.
Thanks in Advance.
Regards
Dharmchand Dhingra
|
|
|
|
|
Simple. You don't have DAO installed on that machine. I wouldn't even use it considering it's older than dirt itself.
Instead of using DAO, use the "Microsoft Jet and Replication Objects" library.
You can find an example of its use here[^].
|
|
|
|
|
Hi
I found the solution of this problem with the help of your reply.
The problem was that on target machine. On target machine .net framework was corrupted. and i repair framework then it is working correct.
Thanks n regards
Dharmchand Dhingra
|
|
|
|
|
Hai. I am using a reporting tool to generate crystal reports.I am grouping my data using the group header property.Now can I get the next group in the next page. How can i do that .Pls help me.
|
|
|
|
|
In the group header or footer you can set new page before/after.
Tosch
|
|
|
|
|
Hi,
I have switched to .NET only recently and I am having some trouble with the picturebox and drawing on it over an image. The aim is to have a picturebox with an image, then using a checkbox, be able to show and hide graphics over the image. In this case I am trying to draw a crosshair at the centre of the image.
The examples I have come across on the web have been minimal help. I am also unclear about the paint event for the picturebox and the form. I suspect I should be calling the draw the crosshair sub in one or both of these events ... as well as in the checkbox event?
I have created a simple, to show my problem. My hope is someone can set me straight here.
Below is the code from my sample form.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'LOAD A IMAGE INTO THE PICTUREBOX
PictureBox1.Load("SampleImage.jpg")
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
'Show the Cental Crosshair
DisplayCentralXhair()
Else
'Do not show (erase?) the Central Crosshair
RemoveCentralXhair()
End If
End Sub
Private Sub DisplayCentralXhair()
Dim mypen As Pen
Dim aGraphics As Graphics
mypen = New Pen(Color.Red, 1)
aGraphics = PictureBox1.CreateGraphics()
aGraphics.DrawLine(mypen, 182, 137 - 5, 182, 137 + 5)
aGraphics.DrawLine(mypen, 182 - 5, 137, 182 + 5, 137)
End Sub
Private Sub RemoveCentralXhair()
'Can I clear the Graphics drawn on the picturebox and retain the image below ?
'Do I have to reload the image ?
End Sub
End Class
|
|
|
|
|
Hi,
this article[^] could point you in the right direction.
BTW: the code shown is C#, the principles are valid in all .NET languages though.
|
|
|
|
|
Thanks for the example Luc.
Unfortunately, I am still not clear with my example if I have to redraw the image when I want to remove the graphics I have drawn ? Or can I clear the graphics without effecting the image below ?
Cheers
Ryan
|
|
|
|
|
A PictureBox has two layers: the image inside (which you can only access through the PictureBox.Image property), and whatever you draw on top of the PB (and best in the Paint handler). These two are not related at all (the image is below the glass plate, your scribbles are on top of the glass plate). I would use PB.Refresh() to erase the latter, if I ever were to use a PB that is.
|
|
|
|
|
Thanks Luc,
The physical description "glass plate" you described has reinforced my own interpretation of how this PB works. The .Refresh() helped too.
I suspect you would not choose a PB to do this task ?
Thanks again.
Ryan
|
|
|
|
|
mates,
I have a big problem on OS, I install my application on
a test machine which is Windows 7. As we all know it is
a 64 bit-operating system. The Windows 7 has a folder
SysWOW64 which is a full copy of system32. Now, when I run
my application, i get an error message says '[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. '
So I google it and search. I found out that my application will read odbc driver
in system32 not in syswow64. so i open odbcad32.exe ins syswow64 folder. which is all driver are listed but when i check it in system32 folder. no driver listed.
what is a possible workaround here, so that my application will read odbc driver in syswow64 folder?
thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|