|
|
using SQLServer 2005
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
please edit your original post.
don't make a new post
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
please answer if u Know.
don't Abuse or Spam the posts
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
|
Hi guys,
I've hit a huge brickwall in my project here. I've made use of the VB6 appbar which is docked above the Windows taskbar at runtime.
When it crashes for whatever reason, and is restarted - the appbar appears above the previously docked space - thus creating an invisible gap above the taskbar.
Windows thinks the crashed appbar still exists, as it hasn't been unregistered properly due to the crash.
To manually fix this, I could click on the taskbar to resize it (When it is not locked) and it would remove that gap and the toolbar would then move down to the space it should be in.
What I need is a way to programmatically do this within my application so I could check a flag and refresh the desktop workspace to eliminate the gap.
I've looked around and tried a desktop icon refresh, to no success.
Please help!!!
Steve Rad
|
|
|
|
|
Hi
I want to add a alpa channel to a picture and save it to use it as a icon. i can draw on a picture and save it but i dont know how to add the alpha channel(and save it)?Im a newbi to programminmg.
This is the code i use:
________________________________________________________________
Imports System.Drawing
Imports System.Drawing.Drawing2D
Public Class Form1
Inherits System.Windows.Forms.Form
Private objBitmap As Bitmap
Private objGraphics As Graphics
Private strImgFile As String = "test.bmp"
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
objBitmap = New Bitmap(200, 200, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
objGraphics = Graphics.FromImage(objBitmap)
Dim img As Image = Image.FromFile(Environment.CurrentDirectory & "\" & "yukon.gif")
objGraphics.DrawImage(img, 0, 0)
End Sub
Dim path As New GraphicsPath
Dim prevPt As New Point(100, 100)
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawPath(Pens.Black, path)
End Sub
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As _
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
prevPt.X = e.X
prevPt.Y = e.Y
path.StartFigure()
End If
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As _
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Dim g As Graphics = PictureBox1.CreateGraphics
Dim currPt As Point = New Point(e.X, e.Y)
'g.DrawLine(Pens.Black, prevPt, currPt)
objGraphics.DrawLine(Pens.Black, prevPt, currPt)
path.AddLine(prevPt, currPt)
prevPt = currPt
PictureBox1.Image = objBitmap
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
If MessageBox.Show("Bild speichern als " & strImgFile & " ?", _
"Bild speichern?", _
MessageBoxButtons.YesNo, _
MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
objBitmap.Save(strImgFile, System.Drawing.Imaging.ImageFormat.Bmp)
MessageBox.Show("Bild wurde gespeichert als " & strImgFile, _
"Bild wurde gespeichert", MessageBoxButtons.OK, _
MessageBoxIcon.Information)
If MessageBox.Show( _
"Bilddatei mit dem Standardprogramm öffnen?", _
"Bilddatei öffnen?", MessageBoxButtons.YesNo, _
MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Dim p As Process = Process.Start("test.bmp")
End If
objBitmap.Dispose()
End If
End Sub
_________________________________________________________________________
|
|
|
|
|
There is no alpha channel in a bmp. The file format doesn't support it. Some people think a 32 bpp bitmap has an alpha channel, but it's not the case. The extra byte per pixel is unused.
If you want to draw a bitmap transparently, set a mask color and use the ImageAttributes class to call DrawImage on the Graphics class, with a transparency range selected.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
How do I validate the entries in a DataGrid to ensure that the user is filling the grid in correctly?
For example, if the user enters a price for 1 to 10 units as being £1.00 on the first row, but they accidentally enter a second price on the second row for 9 to 20 units as £0.90 - how do I catch it (i.e. it should be 11 - 20 units)?
|
|
|
|
|
you can declare the datatable that the datagrid is sourceing as an instance variable with events
<br />
Friend Withevents tab as Datatable<br />
Then you can handle a variety of events related to editing that table such as NewRow and RowChanged
|
|
|
|
|
Hi friends
How to download a file stored in a web folder using VB 6
thanx in advance
KK
|
|
|
|
|
WinINet.DLL has many FTP functions that you can use to download / upload files.
|
|
|
|
|
hi,
try this out.
For dr = 0 To (Adodc1.Recordset.RecordCount - 1)<br />
For dc = 0 To (DataGrid1.Columns.Count - 1)<br />
DataGrid1.Row = dr+1<br />
DataGrid1.Col = dc<br />
ApExcel.Cells(dr+1, dc+1).Value = DataGrid1.Text<br />
'Pass info from data grid to EXCEL<br />
Next dc<br />
<br />
ApExcel.Range("C3:D30").Select 'To establish a selection<br />
ApExcel.Selection.NumberFormat = "0.00" 'Adding different formats<br />
<br />
Next dr<br />
<br />
In EXCEL you can write from row 1 and column 1, thats y statement below
ApExcel.Cells(dr+1, dc+1).Value = DataGrid1.Text
hope m clear.
hope it helps you.
Nitin...
|
|
|
|
|
I've created a word game in VB 6. Now I want to add internet functionality to it so two people can play each other online. I basically need to know how to send a string of text from one instance of the app to another, from one computer to another over the internet.
What's the easiest, simplest way to do this? Can someone point me to a tutorial, or is it something I can do with a control and a few lines of code? Hopefully it's not some huge, hair-greying ordeal that'll make it more trouble than it's worth.
I'll keep searching on my own, but I usually stop in here in case there's a quick answer to it. I thank you in advance, friends.
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
|
Dear All
I have some problem regarding ActivexWebBrowser control in vb.net. I have this browser control on a windows form and i am able to navigate to URL.
Now what i am trying to do is open up a webpage(.aspx) which is having a dripdownlist and dynamically changing its selectedindex through element.setAttribute("selectedIndex", some_Value), and the problem is that the autopostback linked to this dropdownlist in not firing. I am able to change the selected item but the attached event with the aspx page is not firing. For ex. Like if we select some coutry in one dropdownlist, the corresponding states in another dropdownlist are not filling automatically which is the default behavior when we browse that webpage through some web browser.
I used http://network.programming-in.net/articles/InternetExplorer.asp?Internet%20explorer article for help.
Thanks & Regards
Gurmeet Singh
|
|
|
|
|
Hi I am writing a large program where I am using three text boxes. I am performing validation controls on these text boxes however there are some conditions
Names of textboxes
1. x
2. y
3. z
The conditions are
1. x , y , z should be numeric.
2. x and y can be blank ( x = “” , y = “”) at a time
3. z can never be blank, it should always have a numeric value.
4. if x has a value y cannot be blank and x should be non negative
5. if y has a value x cannot be blank and y should not be non negative.
6. if x and y have values y > x
7. z should be non negative
A message box should pop up each time the user clicks a button with the appropriate error ( eg : x cannot be negative , or y cannot be greater than x , etc… )
Since I am actually dealing with cells in a data grid I cannot use any sort of validation controls. I need to perform the validation using code. I am using visual studio 2005 , Visual Basic
Any sort of help will be gratefully appreciated.
snuffnit
|
|
|
|
|
Why is this text in bold ? It's quite annoying.
I guess you need to check these rules in the click event for your button then.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Welcome to the Code Project.
Please don't post the same question all over the place.
---
b { font-weight: normal; }
|
|
|
|
|
Design the logic according to your conditions. And make sure the conditions can fit the logic or you'll never go as you wish.
If you can't create the simple logic of this, you are not better then 10 years old kid.
Hint: Tree diagram method.
I'm sorry.
|
|
|
|
|
Can someone help me out with the Visual Basic source code needed that allows configuration and usage of comm ports in any PC? I am constructing an asynchronous serial communication RS-232 circuit which will include serial cables (transmitter and receiver) connected from one pc to another pc with a null modem in between. The VB program will be used to input the data and the output will appear on the remote PC.
Thanks so much!
|
|
|
|
|
How can I tell my program to read the folders that are different on peoples computers like mine for example.
C:\Documents and Settings\Code Crapper\Cookies
Now as you can see your computer has not got that, your computer (if its XP) would have.
Drive letter:\Documents and Settings\Your Name\Cookies
So my question is, how do I get it to work on anybodys computer? do I have to do something like this?
%systemroot%\DOCU~\%USER%\Cookies ????
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Are you trying to access the "Documents and Settings" folder, or the current user's folder?
|
|
|
|
|
I need to get through the bit that says Code Crapper, the user name because otherwise the program wont work on any other computer with a different user name.
So far I have "C:\DOCUME~1\username (dont work)"
The 'DOCUME~1' bit works but I just need the username bit, I tried 'USER~1'and 'USERNA~1' but no luck.
All I need to know is the Username one and then I can do things like.
C:\DOCUME~1\Username?\Cookies
I can do anything else which does not require a user name too like
C:\DOCUME~1\All Users\LOCALS~1\
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Ok, for the current user, just use the path variable %HOMEPATH% , which specifies "C:\Documents and Settings\Current User".
If that doesn't work, then you could try accessing the registry key:
HKEY_Current_User\Volatile Environment\HOMEPATH
-- modified at 22:31 Wednesday 29th November, 2006
|
|
|
|