Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

astcws

@astcws
About
Posts
22
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • My metafile code, what did I lose?
    A astcws

    Yeah!!! Thank you! Thank you! very much... I have been confused many days about this problem until you taught me the correct way. Really thank you again! I don't know how to describe my happyiness.

    Visual Basic graphics help question learning

  • My metafile code, what did I lose?
    A astcws

    The code below is I copy from a book , and try to change using the memorystream. However, it didn't work. What thing I lost? Can someone help me? Thanks very much. Dim stream As New MemoryStream Dim m As Metafile Dim g As Graphics = Me.CreateGraphics Dim _hdc As IntPtr _hdc = g.GetHdc m = New Metafile(stream, _hdc) g.ReleaseHdc() Dim gr As Graphics = Graphics.FromImage(m) gr.PageUnit = GraphicsUnit.Pixel gr.Clear(Color.White) gr.DrawEllipse(Pens.Red, Bounds) gr.DrawLine(Pens.Blue, 0, 0, 100, 100) gr.DrawLine(Pens.Blue, 100, 0, 0, 100) gr.Dispose() m.Dispose() m = New Metafile(stream) 'break in here. Dim bm As New Bitmap(100, 100) gr = Graphics.FromImage(bm) Dim dest_bounds As New RectangleF(0, 0, 100, 100) Dim source_bounds As New RectangleF(0, 0, 100, 100) gr.DrawImage(m, Bounds, source_bounds, GraphicsUnit.Pixel) pic.SizeMode = PictureBoxSizeMode.AutoSize pic.Image = bm gr.Dispose() m.Dispose()

    Visual Basic graphics help question learning

  • Why I can draw this image? This is my code.
    A astcws

    Yeah, what a stupid mistake? As the method "disposed"...I really don't know it before... Thanks very much.

    Visual Basic graphics question

  • Why I can draw this image? This is my code.
    A astcws

    I wrote two functions to draw something like this. __ __ _____ __ __ _____ __ __ _____ Have six lines and two kinds. The Yao fuction draws ____ or __ __ and the DoubleGua one send a string like "010101" to Yao to draw lines. However, I cannot draw six lines. Only one line show on my form. Where am I wrong? Can't this funtion run? The function is as below: Public Function DoubleGua(ByVal GuaIndex As String) As Bitmap Dim Lx As Integer = 7 Dim myBmp As New Bitmap(40, 42) Dim g As Graphics = Graphics.FromImage(myBmp) Dim i As Byte For i = 0 To 5 Dim Lpoint As New Point(Lx * i, 0) Dim tmpyao As String = GuaIndex.Substring(i, 1) g.DrawImage(Yao(tmpyao, Color.Black), Lpoint) Next Return myBmp End Function Public Function Yao(ByVal PorN As String, ByVal _Color As Color) As Bitmap Dim myBmp As New Bitmap(40, 5) Dim g As Graphics = Graphics.FromImage(myBmp) Dim Guabrush As SolidBrush = New SolidBrush(_Color) Select Case PorN Case "0" Dim rects As Rectangle() = {New Rectangle(0, 0, 18, 5), New Rectangle(22, 0, 18, 5)} g.FillRectangles(Guabrush, rects) Case "1" Dim rects As Rectangle() = {New Rectangle(0, 0, 40, 5)} g.FillRectangles(Guabrush, rects) End Select Return myBmp End Function

    Visual Basic graphics question

  • Help! Can anyone give me a simple code about drawing Metafile (use the memorystream)?
    A astcws

    I need to draw a metafile by using Memorystream. But I don't know how to do this. All sample I can find on the internet is C# or using Bitmap or using a real file. I hope I can draw it immediatelly on the form and don't have to use a file. I have studied it several days but I still don't know how to do this. Can any one give me a example? Just a simple one is ok. Like draw some words on the form, for example. I would very appreciate it if some one can help me this.

    Visual Basic graphics tutorial csharp help question

  • Can vb delcare a var like this?
    A astcws

    I must say thanks to both of you. But, your answers look like different. Which one is correct? int16 or integer? And VB really can use the code like "&H4bd8",Dave Kreskowiak? Really thanks again.

    Visual Basic question javascript data-structures

  • Can vb delcare a var like this?
    A astcws

    This code is from javascript as below. var lunarInfo=new Array( 0x4bd8,0x4ae0,0xa570,0x54d5,0xd260,0xd950,0x5554,0x56af,0x9ad0,0x55d2, 0x4ae0,0xa5b6,0xa4d0,0xd250,0xd295,0xb54f,0xd6a0,0xada2,0x95b0,0x4977, 0x497f,0xa4b0,0xb4b5,0x6a50,0x6d40,0xab54,0x2b6f,0x9570,0x52f2,0x4970, 0x6566,0xd4a0,0xea50,0x6a95,0x5adf,0x2b60,0x86e3,0x92ef,0xc8d7,0xc95f, 0xd4a0,0xd8a6,0xb55f,0x56a0,0xa5b4,0x25df,0x92d0,0xd2b2,0xa950,0xb557, 0x6ca0,0xb550,0x5355,0x4daf,0xa5b0,0x4573,0x52bf,0xa9a8,0xe950,0x6aa0, 0xaea6,0xab50,0x4b60,0xaae4,0xa570,0x5260,0xf263,0xd950,0x5b57,0x56a0, 0x96d0,0x4dd5,0x4ad0,0xa4d0,0xd4d4,0xd250,0xd558,0xb540,0xb6a0,0x95a6, 0x95bf,0x49b0,0xa974,0xa4b0,0xb27a,0x6a50,0x6d40,0xaf46,0xab60,0x9570, 0x4af5,0x4970,0x64b0,0x74a3,0xea50,0x6b58,0x5ac0,0xab60,0x96d5,0x92e0, 0xc960,0xd954,0xd4a0,0xda50,0x7552,0x56a0,0xabb7,0x25d0,0x92d0,0xcab5, 0xa950,0xb4a0,0xbaa4,0xad50,0x55d9,0x4ba0,0xa5b0,0x5176,0x52bf,0xa930, 0x7954,0x6aa0,0xad50,0x5b52,0x4b60,0xa6e6,0xa4e0,0xd260,0xea65,0xd530, 0x5aa0,0x76a3,0x96d0,0x4afb,0x4ad0,0xa4d0,0xd0b6,0xd25f,0xd520,0xdd45, 0xb5a0,0x56d0,0x55b2,0x49b0,0xa577,0xa4b0,0xaa50,0xb255,0x6d2f,0xada0, 0x4b63,0x937f,0x49f8,0x4970,0x64b0,0x68a6,0xea5f,0x6b20,0xa6c4,0xaaef, 0x92e0,0xd2e3,0xc960,0xd557,0xd4a0,0xda50,0x5d55,0x56a0,0xa6d0,0x55d4, 0x52d0,0xa9b8,0xa950,0xb4a0,0xb6a6,0xad50,0x55a0,0xaba4,0xa5b0,0x52b0, 0xb273,0x6930,0x7337,0x6aa0,0xad50,0x4b55,0x4b6f,0xa570,0x54e4,0xd260, 0xe968,0xd520,0xdaa0,0x6aa6,0x56df,0x4ae0,0xa9d4,0xa4d0,0xd150,0xf252, 0xd520); I cannot very understand what is this. Can vb do this? If can, how? Thanks very much.

    Visual Basic question javascript data-structures

  • Is it possible to grab a pop up message written by javascript from a html page in a webbrowser control?
    A astcws

    http://sean.o4u.com/ap/calendar/calendar.htm[^] This link above is a Chinese calendar. If you move mouse to any day on the calendar, it will pop up some informations about Chinese. This page can be downloaded. I have question that...is there any method to grab the pop up information of this page? I wite a windows form and I hope I can do this. Can any one help me? thanks very much.

    Visual Basic question javascript html com help

  • Is it possible to grab a pop up message written by javascript from a html page in a webbrowser control.
    A astcws

    http://sean.o4u.com/ap/calendar/calendar.htm[^] This link above is a Chinese calendar. If you move mouse to any day on the calendar, it will pop up some informations about Chinese. This page can be downloaded. I have question that...is there any method to grab the pop up information of this page:doh:? I wite a windows form and I hope I can do this. Can any one help me? thanks very much.

    Windows Forms question javascript html com help

  • Text to Image Dynamic( text is words that was created by myself)
    A astcws

    Hi, there. I have some trouble to convert my text to image. I programed a webform that use drawstring and response.outputstream to show the image. But, it still have problem. Bescause I have some words that was created by myself and save as unicode type( of course ,only on my own computer can look these words). I hope to transfer it to image so that it can be loaded on a webpage as an image. The graphic program worked well when it was programed as a window form(can draw the words that I made). However, when I use it on a web page, it can only draw the words from standard unicode. If I typed the words that I made,it cannot draw anything?. Does anyone be able to help me? Thanks very much.:confused::sigh::doh:

    ASP.NET help question learning

  • how draw text dynamicly without margin and in any font-size?
    A astcws

    I find some papers of creating text dynamicly and I can do it now. But, I found that the image of the text have margin. Althought I can change the width , height or (x,y)points to make it fit to the margin. But it will be changed after the font-size was changed. I need to control it because our chinese papers have many words that cannot be showed on clientside so that we need to change it to be an image. Can someone help me?

    ASP.NET help question

  • can I use asp.net to write javascript in the '<head>'?
    A astcws

    Hi, I want to write javascript into . I just know use the "RegisterClientScriptBlock" method, but it doesn't write it between . Can someone help me? Thank you.

    ASP.NET csharp javascript asp-net help question

  • How to catch or reserve the value of the controls that were created by dynamic?
    A astcws

    Ok,I got it. Thanks a lot.

    ASP.NET csharp asp-net tutorial question

  • How to catch or reserve the value of the controls that were created by dynamic?
    A astcws

    Hi,there. I am a new guy of asp.net:-O and hope to learn it better. I hope to use the datagrid to bind data and change its editmode by dynamic. I do this because my datasource is unknow and I won't know how many columns will the datasource have,either. That's why I need to make the datagrid dynamic. My code is below. I write some code at the onitembound event of the datagrid, and catch the edititemindex of the datagrid if it is not -1. Then, I catch the edititem and its controls, and replace it, change its cells columnspan..... But,however :(,I don't know how to reserve the value of the controls that I created:doh:. Because of the cycle of Asp.Net, all of them will dispear before the datagrid.updatecommand events was fired. I am still not very familiar with the cycle of asp.net and its events:confused:. Can someone teach me what should I do in the next step or this is still a wrong way:)? <%@ Page Language="VB" AutoEventWireup="True"%> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> Function CreateDataSource() As ICollection ' Create sample data for the DataGrid control. Dim dt As DataTable = New DataTable() Dim dr As DataRow ' Define the columns of the table. dt.Columns.Add(New DataColumn("IntegerValue", GetType(Integer))) dt.Columns.Add(New DataColumn("StringValue", GetType(String))) dt.Columns.Add(New DataColumn("CurrencyValue", GetType(Double))) ' Populate the table with sample values. Dim i As Integer For i = 0 to 8 dr = dt.NewRow() dr(0) = i dr(1) = "Item " & i.ToString() dr(2) = 1.23 * (i + 1) dt.Rows.Add(dr) Next i ' Create a DataView from the DataTable. Dim dv As DataView = New DataView(dt) Return dv End Function sub binddata() ItemsGrid.DataSource = CreateDataSource() ItemsGrid.DataBind() end sub Sub Page_Load(sender As Object, e As EventArgs) ' Load sample data only once when the page is first loaded. If Not IsPostBack Then binddata() End If End Sub 'I catch the edititemindex and change it below. sub itemsgridbound(sender as object, e as DataGridItemEventArgs) if itemsgrid.edititemindex <> -1 then if e.item.itemindex</x-turndown>

    ASP.NET csharp asp-net tutorial question

  • the HttpRequestValidationException....How can I solve it??
    A astcws

    I... must ask some stupid question....

    ASP.NET question csharp javascript asp-net

  • the HttpRequestValidationException....How can I solve it??
    A astcws

    Hi,there.... I don't know how can I type any tag in my textbox, and send it back server. Althought I know that set the validateRequest=false will work it. However, I cannot avoid any script,too.:( And...I cannot write javascript richtextbox like this message editor. So, what is the most simple way to do it?(Only use asp.net and vb.net):sigh: Or,the conventient javascript richbox I can embed and run it with vbscript. I have ever found this free code: http://www.interactivetools.com/products/htmlarea/ But I don't know how can I transfer the content back my server. It always have error X| . So....I will almost give up:((..until I understand javascript. Now...I only wonder the most easy way. Thanks very much. Best regardly.

    ASP.NET question csharp javascript asp-net

  • where i am wrong
    A astcws

    I have a hyperlink control code that need to bind from a database. However, I am still not very familiar with this. Can somebody help me? And may you tell me the rules about bind data to html code? The italic part is the wrong code.... <asp:HyperLink NavigateUrl='index?titlename='<%# container.dataitem("title") %> Runat ="server" ><%# container.dataitem("title") %></asp:HyperLink>

    ASP.NET database html sysadmin docker help

  • How to create an webform without toolbar....
    A astcws

    I use vb language to write asp.net. I don't know how to create a webform(look like messagebox or some popup advertisement....). Thanks very much.

    ASP.NET csharp asp-net tutorial

  • message boxes in web applications
    A astcws

    Hi,I find a link by google than can solve this problem. You can take a look...althought I still cannot understand very well. http://www.dotnet247.com/247reference/msgs/25/127821.aspx ;P

    ASP.NET question csharp asp-net

  • Can I scroll in a column of a table?
    A astcws

    Yeah...exactly. After I saw your message, I went to library and rent a book(O'reilly Cascading Style Sheets). But I can find this attribute. May I ask you how can I get more information about it? Isn't it CCS ? Or it is offered from others that I never know? Thank you very much.

    ASP.NET database help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups